package sctu.edu.java.year2016.team03.zhaoyong.day20160525.chapter7_2;

/**
 * 尝试编写一个矩形类，将长与宽座位矩形类的属性，在构造方法中将长、宽初始化，定义一个成员方法求此矩形的面积
 * Created by zhaoyong on 2016/5/26.
 */
public class Work {
    private int length;
    private int width;
    public Work(int length,int width) {
        this.length = length;
        this.width = width;
    }
    public int getArea() {
        return this.length*this.width;
    }
    public static void main(String [] args) {
        Work rect = new Work(6,4);
        System.out.println(rect.getArea());
    }
}
